import request from '@/utils/request'

//自动编码获取的接口@鲍小伟20251128
//根据id释放端口号
export function sfMinNoBySeqid(seqid) {
    return request({
        url: '/system/pcodelist/sfMinNo/' + seqid,
        method: 'post',
    })
}
//保存的时候变更使用状态
export function useMinNoBySeqid(seqid) {
    return request({
        url: '/system/pcodelist/useMinNo/' + seqid,
        method: 'post',
    })
}

// 获取下一个采购单号（自动生成）
export function nextPurchaseNo() {
    return request({
        url: '/system/pcodelist/nextNo',
        method: 'get'
    })
}

//最小化获取接口 @鲍小伟20251201
export function nextMinPurchaseNo() {
    return request({
        url: '/system/pcodelist/nextMinNo',
        method: 'get'
    })
}

// 查询采购单自动编码列表
export function listPcodelist(query) {
    return request({
        url: '/system/pcodelist/list',
        method: 'get',
        params: query
    })
}

// 查询采购单自动编码详细
export function getPcodelist(seqid) {
    return request({
        url: '/system/pcodelist/' + seqid,
        method: 'get'
    })
}

// 新增采购单自动编码
export function addPcodelist(data) {
    return request({
        url: '/system/pcodelist',
        method: 'post',
        data: data
    })
}

// 修改采购单自动编码
export function updatePcodelist(data) {
    return request({
        url: '/system/pcodelist',
        method: 'put',
        data: data
    })
}

// 删除采购单自动编码
export function delPcodelist(seqid) {
    return request({
        url: '/system/pcodelist/' + seqid,
        method: 'delete'
    })
}